{% extends "User_panel/base_user_panel.html" %}
{% block panel-content %}
    <div id="center">
            <div>
                <a href="/order/display/">All Orders({{total_orders_num}})</a>
                <br>
                <a href="/order/filter/PROCESSED/">Processed Orders({{processed_num}})</a>&nbsp&nbsp&nbsp&nbsp;<a href="/order/filter/SHIPPED/">Shipped &nbsp;Orders({{shipped_num}})</a>&nbsp&nbsp&nbsp&nbsp;<a href="/order/filter/ARRIVED/">Arrived Orders({{arrived_num}})</a>
                <br>
                <a href="/order/filter/CANCELLED/">Cancelled &nbsp;Orders({{cancelled_num}})</a>&nbsp&nbsp&nbsp&nbsp&nbsp;<a href="/order/filter/FINISHED/">Finished Orders({{finished_num}})</a>
            </div>
            <br>
            {% if orders %}
            <table id="orders_display">
                <thead>
                    <tr align="center">
                        <th>Order Number</th>
                        <th>Status</th>
                        <th>Order Time</th>
                        <th>Updated At</th>
                    </tr>
                </thead>
                <tbody>
                     {% for order in orders %}
                        <tr align="center">
                            <td><a href="/order/display/details/{{order.id}}/">{{order.id}}</a></td>
                            <td>{{order.status.type}}</td>
                            <td>{{order.created}}</td>
                            <td>{{order.changed}}</td>
                        </tr>
                    {% endfor %}
                </tbody>
                </table>
        {% else %}
            
        {% endif %}
    </div>
{% endblock %}